package com.takanafu.haru.code{
	import com.takanafu.haru.code.CodeBase;
	
	public class CodeDotAssign extends CodeBase{
		private var firstCode:CodeBase;
		private var secondCode:CodeBase;
		private var symbol:CodeSymbol;
		
		public function CodeDotAssign(c1:CodeBase,sym:CodeSymbol,c2:CodeBase){
			this.firstCode = c1;
			this.secondCode = c2;
			this.symbol = sym;
		}
		
		override public function run():CodeBase{
			var c1:CodeBase = firstCode.run();
			var c2:CodeBase = secondCode.run();
			
			c1.assign(this.symbol,c2);
			return c2;
		}
	}
}